<?php

function tagWrap($tag, $txt, $func = ""){
	if((!empty($txt))&&(function_exists($func))){
		$txt = $func($txt);
		return "<b>".$txt."</b><br/>";
	}else{
		return "<b>".$txt."</b><br/>";
	}
}

function underline($txt){
	return "<span style=\"text-decoration:underline;\">".$txt."</span>";
}

echo tagWrap('b', 'make me bold');

echo tagWrap('i', 'underline me too', "underline");

echo tagWrap('i', 'make me italic and quote me',
create_function('$txt', 'return "&quot;$txt&quot;";')
);

?>
